#ifndef REGISTER_H
#define REGISTER_H

#include <QWidget>
#include <QDialog>
#include <QBuffer>
#include <QMessageBox>
#include <QJsonObject>
#include <QByteArray>
#include <QRegularExpressionValidator>

namespace Ui {
class Register;
}

class Register : public QDialog
{
    Q_OBJECT

public:
    explicit Register(QWidget *parent = nullptr);
    ~Register();
    void initValidator();// 设置密码框的输入验证器

signals:
    void registerData(QJsonObject& jsonObj);// 完成注册后将数据返回给主类的信号

private slots:
    void on_registerBtn_clicked();

private:
    Ui::Register *ui;
};


// 头像框类

#include <QLabel>
#include <QMouseEvent>
#include <QFileDialog>


class MyAvatarLabel : public QLabel
{
    Q_OBJECT
public:
    explicit MyAvatarLabel(QWidget *parent = nullptr);

protected:
    void mousePressEvent(QMouseEvent* event) override;

};


#endif // REGISTER_H
